<?php $this->load->view('layout/header');?>
<div class="supplier-content-page">
    <div class="product-test-h5">
        <ul class="breadcrumb">
            <li><a href="javascript:;">消息</a></li>
            <li>
                <a href="<?php 
							switch($result->type)
							{
								case 1://MESSAGE_SMS
									echo site_url('mailbox/receiveBox');
									break;
								case 2://MESSAGE_NOTICE
									echo site_url('mailbox/systemMessage');
									break;
								case 4://MESSAGE_ORDER
									echo site_url('mailbox/orderMessage');
									break;
								default:
									break;
							}
						 ?>"><?php 
							switch($result->type)
							{
								case 1://MESSAGE_SMS
									echo"站内信";
									break;
								case 2://MESSAGE_NOTICE
									echo"系统通知";
									break;
								case 4://MESSAGE_ORDER
									echo"订单通知";
									break;
								default:
									echo "未知";
									break;
							}
						 ?></a>
            </li>
            <li class="active"><a href="javascript:;">查看全文</a></li>
        </ul>
		<?php echo execute_alert_message();?>
		<div class="add-product">
			<div class="fonter">消息详情</div>
			<form class="form-horizontal" action="<?php  echo site_url('mailbox/save');?>" method="POST">
			    <div class="form-group">
                    <label class="col-sm-1 control-label">主题：</label>
                    <div class="col-xs-3">
                      <input type="text" class="form-control" name="title" value="<?php echo $result->title; ?>" readonly="readonly">
                    </div>
                </div>
				<div class="form-group">
                    <label class="col-sm-1 control-label">发件人：</label>
                    <div class="col-xs-3">
                      <input type="text" class="form-control" name="fname" value="<?php echo $result->fname; ?>" readonly="readonly">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-1 control-label">时间：</label>
                    <div class="col-xs-3">
                      <input type="text" class="form-control" name="ftime" value="<?php echo $result->ftime; ?>" readonly="readonly">
                    </div>
                </div>
				<div class="form-group">
                    <label class="col-sm-1 control-label">收件人：</label>
                    <div class="col-xs-3">
                      <input type="text" class="form-control" name="sname" value="<?php echo $result->sname; ?>" readonly="readonly">
                    </div>
                </div>
				<div class="form-group">
                    <label class="col-sm-1 control-label">正文：</label>
                    <div class="col-xs-10">
                      <textarea class="form-control textarea-multipart-edit" rows="5" readonly="readonly"><?php echo $result->content; ?></textarea>
                    </div>
                </div>	
				<!-- 系统通知和订单通知使用这个 -->
				<?php if($flag==1):  ?>
				    <div class="form-group">
					    <label class="col-sm-1 control-label"><a href="javascript:window.history.go(-1)">>>返回列表</a>
						</label>
					</div>
				<?php endif; ?>
				<!-- 系统通知和订单通知使用这个 -->
				<!-- 站内信使用这个 -->
				<?php if($flag==2):  ?>
				    <div class="form-group">
					    <label class="col-sm-1 control-label">快捷回复：</label>
					    <div class="col-xs-8">
						    <textarea class="form-control" name="content"></textarea>
					    </div>
				    </div>
					<div class="supplierlist-submit">
				        <button type="submit" class="btn btn-default">发布</button>
                    </div>
					<input type="hidden" name="sid" value="<?php echo $result->fid; ?>" /> 
				    <input type="hidden" name="state" value="1" />
					<div class="form-group">
					    <label class="col-sm-1 control-label"><a href="javascript:window.history.go(-1)">>>返回列表</a>   
						</label>
					</div>
				<?php endif; ?>
				<!-- 站内信使用这个 -->
			</form>		
		</div>
		<div>&nbsp;</div>
	</div>
</div>
<?php $this->load->view('layout/footer');?>
